<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
</head>
<body>

<form method="post">
    <label>用户名：</label><input type="text" name="username"><br>
    <label>密码：</label><input type="password" name="password"><br>
    <label>确认密码：</label><input type="password" name="password2"><br>
    <input type="submit" value="提交"><br>


{#使用遍历来获取闪现的消息#}
    {% for message in get_flashed_messages() %}
            {{ message }}
    {% endfor %}


</form>

<hr>

<form method="post">
    {{ form.csrf_token() }}
    {{ form.username.label }}{{ form.username}}<br>
    {{ form.password.label }}{{ form.password}}<br>
    {{ form.password2.label }}{{ form.password2}}<br>
    {{ form.submit}}<br>
</form>


</body>
</html>